﻿# Byzantium
charioteer_template = {
	age = { 16 30 }
	culture = root.location.culture
	faith = root.location.faith
	dynasty = generate

	#Education
	random_traits_list = {
		count = 1
		education_diplomacy_1 = {}
		education_martial_1 = {}
		education_stewardship_1 = {}
		education_intrigue_1 = {}
		education_learning_1 = {}
	}
	
	#Personality
	random_traits_list = {
		count = 2
		ambitious = {}
		arrogant = {}
		deceitful = {}
		diligent = {}
		impatient = {}
		honest = {}
		brave = {}
		lustful = {}
		wrathful = {}
	}
	random_traits = yes

	prowess = {
		min_template_decent_skill
		max_template_high_skill
	}

	gender_female_chance = activity_location_faith_dominant_gender_female_chance
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}

generic_bookmaker_character = {
	age = { 20 40 }
	random_traits_list = {
		count = 1
		education_stewardship_1 = {}
		education_stewardship_2 = {}
		education_stewardship_3 = {}
		education_stewardship_4 = {}
	}
	dynasty = generate
	random_traits = yes
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
	stewardship = {
		min_template_decent_skill
		max_template_decent_skill
	}
	prowess = { 2 10 }
	martial = { 2 10 }
	diplomacy = { 5 13 }
	learning = { 5 13 }
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}

anatolian_guide_character = {
	age = { 16 35 }
	trait = rough_terrain_expert
	trait = lifestyle_traveler
	trait = peasant_leader
	random_traits_list = {
		count = 1
		education_martial_1 = {}
		education_martial_2 = {}
	}
	gender_female_chance = root_faith_dominant_gender_female_chance 
	prowess = {
		min_template_low_skill
		max_template_average_skill
	}
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}

varangian_template = {
	age = { 16 45 }
	random_traits = yes

	random_traits_list = {
		education_martial_1 = { weight = { base = 35 } }
		education_martial_2 = { weight = { base = 35 } }
		education_martial_3 = { weight = { base = 20 } }
		education_martial_4 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 0 1 }
		lifestyle_blademaster = {}
		lifestyle_hunter = {}
		lifestyle_traveler = {}
		strong = {}
		athletic = {}
		gallant = {}
		poet = {}
		greedy = {}
		ambitious = {}
		brave = {}
		diligent = {}
		wrathful = {}
		vengeful = {}
		loyal = {}
	}
	prowess = {
		min_template_average_skill
		max_template_decent_skill
	}
	gender_female_chance = root_soldier_female_chance
	after_creation = {
		add_trait = varangian
		add_trait = tourney_participant
		add_trait_xp = {
			trait = tourney_participant
			track = foot
			value = 25
		}
		random = {
			chance = 25
			add_trait_xp = {
				trait = tourney_participant
				track = foot
				value = 25
			}
		}
		random = {
			chance = 5
			add_trait_xp = {
				trait = tourney_participant
				track = foot
				value = 30
			}
		}

		# Cultural Traditions
		#berserker
		if = {
			limit = {
				faith.religion = faith:norse_pagan.religion
			}
			random = {
				chance = 33
				add_trait = berserker
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = winter_soldier_trait_more_common
				}
				NOT = {
					has_trait = winter_soldier
				}
			}
			random = {
				chance = 10
				add_trait = winter_soldier
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = forest_fighter_trait_more_common
				}
				NOT = {
					has_trait = forest_fighter
				}
			}
			random = {
				chance = 10
				add_trait = forest_fighter
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = rough_terrain_expert_trait_more_common
				}
				NOT = {
					has_trait = rough_terrain_expert
				}
			}
			random = {
				chance = 10
				add_trait = rough_terrain_expert
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = desert_warrior_trait_more_common
				}
				NOT = {
					has_trait = desert_warrior
				}
			}
			random = {
				chance = 10
				add_trait = desert_warrior
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = jungle_stalker_trait_more_common
				}
				NOT = {
					has_trait = jungle_stalker
				}
			}
			random = {
				chance = 10
				add_trait = jungle_stalker
			}
		}
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_blademaster
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
		set_interesting_traits_and_modifiers_effect = yes
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_prostitute_character = {
	age = { 18 30 }
	random_traits_list = {
		count = 1
		beauty_good_1 = {}
		beauty_good_2 = {}
		beauty_good_3 = {}
	}
	dynasty = generate
	random_traits = yes
	culture = root.culture
	faith = root.faith
	intrigue = {
		min_template_decent_skill
		max_template_decent_skill
	}
	after_creation = {
		add_trait = fornicator
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_common_fan_character = {
	age = { 18 50 }
	random_traits = yes
	random_traits_list = {
		education_diplomacy_1 = { weight = { base = 35 } }
		education_diplomacy_2 = { weight = { base = 35 } }
		education_intrigue_1 = { weight = { base = 35 } }
		education_intrigue_2 = { weight = { base = 35 } }
		education_stewardship_1 = { weight = { base = 35 } }
		education_stewardship_2 = { weight = { base = 35 } }
	}
	culture = root.culture
	faith = root.faith
	dynasty = generate
	martial = {
		min_template_low_skill
		max_template_low_skill
	}
	stewardship = {
		min_template_low_skill
		max_template_low_skill
	}
	diplomacy = {
		min_template_low_skill
		max_template_low_skill
	}
	intrigue = {
		min_template_low_skill
		max_template_low_skill
	}
	learning = {
		min_template_low_skill
		max_template_low_skill
	}
	prowess = {
		min_template_average_skill
		max_template_decent_skill
	}
	
	after_creation = {
		random_list = {
			200 = {
				# Character is of average weight, nothing happens	
			}
			25 = {
				change_current_weight = -25
			}
			25 = {
				change_current_weight = -75
			}
			25 = {
				change_current_weight = 25
			}
			25 = {
				change_current_weight = 75
			}
			5 = {
				change_current_weight = 100
			}
			5 = {
				change_current_weight = 200
			}
		}
		add_character_flag = peasant_outfit
		set_interesting_traits_and_modifiers_effect = yes
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_magistrate_character = {
	age = { 18 50 }
	trait = deceitful
	trait = greedy
	random_traits = yes
	random_traits_list = {
		education_stewardship_1 = { weight = { base = 35 } }
		education_stewardship_2 = { weight = { base = 35 } }
		education_stewardship_3 = { weight = { base = 35 } }
	}
	gender_female_chance = root_soldier_female_chance
	culture = root.culture
	faith = root.faith
	dynasty = generate
	martial = {
		min_template_low_skill
		max_template_low_skill
	}
	stewardship = {
		min_template_average_skill
		max_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		max_template_low_skill
	}
	intrigue = {
		min_template_low_skill
		max_template_low_skill
	}
	learning = {
		min_template_low_skill
		max_template_low_skill
	}
	prowess = {
		min_template_low_skill
		max_template_low_skill
	}
	
	after_creation = {
		set_interesting_traits_and_modifiers_effect = yes
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_frankokratia_crusader_template = {
	age = { 18 40 }
	random_traits = yes
	culture = scope:frankokratia_crusader.culture
	faith = scope:frankokratia_crusader.faith
	gender_female_chance = {
		if = {
			limit = {
				scope:frankokratia_crusader.faith = { has_doctrine = doctrine_gender_male_dominated }
			}
			add = 0
		}
		else_if = {
			limit = {
				scope:frankokratia_crusader.faith = { has_doctrine = doctrine_gender_female_dominated }
			}
			add = 100
		}
		else = {
			add = 50
		}
	}
	random_traits_list = {
		education_martial_1 = { weight = { base = 35 } }
		education_martial_2 = { weight = { base = 35 } }
		education_martial_3 = { weight = { base = 20 } }
		education_martial_4 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = 1
		strong = {}
		athletic = {}
		disloyal = {}
		faith_warrior = {}
		lifestyle_traveler = {}
		pilgrim = {}
		ambitious = {}
		greedy = {}
		impatient = {}
		zealous = {}
		brave = {}
		wrathful = {}
		callous = {}
		sadistic = {}
	}
	after_creation = {
	# Cultural Traditions
		if = {
			limit = {
				culture = {
					has_cultural_parameter = winter_soldier_trait_more_common
				}
				NOT = {
					has_trait = winter_soldier
				}
			}
			random = {
				chance = 10
				add_trait = winter_soldier
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = forest_fighter_trait_more_common
				}
				NOT = {
					has_trait = forest_fighter
				}
			}
			random = {
				chance = 10
				add_trait = forest_fighter
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = rough_terrain_expert_trait_more_common
				}
				NOT = {
					has_trait = rough_terrain_expert
				}
			}
			random = {
				chance = 10
				add_trait = rough_terrain_expert
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = desert_warrior_trait_more_common
				}
				NOT = {
					has_trait = desert_warrior
				}
			}
			random = {
				chance = 10
				add_trait = desert_warrior
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = jungle_stalker_trait_more_common
				}
				NOT = {
					has_trait = jungle_stalker
				}
			}
			random = {
				chance = 10
				add_trait = jungle_stalker
			}
		}
		set_interesting_traits_and_modifiers_effect = yes
		shogunate_set_fictional_nickname_effect = yes
	}
}


# LAAMP

laamp_inheritor_template = {
	age = { 25 50 }
	dynasty = generate

	random_traits = yes

	gender_female_chance = root_soldier_female_chance
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}

traveler_character = {
	age = { 25 45 }
	random_traits = yes
	faith = this.faith
	gender_female_chance = 50
	diplomacy = {
		min_template_low_skill
		max_template_high_skill
	}
	learning = {
		min_template_low_skill
		max_template_high_skill
	}
	intrigue = {
		min_template_low_skill
		max_template_high_skill
	}
	prowess = {
		min_template_low_skill
		max_template_high_skill
	}
	after_creation = {
		random_list = {
			20 = {
				add_trait = lifestyle_traveler
			}
			20 = {
				trigger = {
					this.faith = {
						NOT = { has_doctrine_parameter = forbidden_from_pilgrimage }
					}
				}
				add_trait = pilgrim
			}
			10 = {
				trigger = {
					this.faith = {
						NOT = { has_doctrine_parameter = forbidden_from_pilgrimage }
					}
				}
				add_trait = pilgrim
				add_trait = lifestyle_traveler
			}
		}
		set_interesting_traits_and_modifiers_effect = yes
		if = {
			limit = {
				has_trait = lifestyle_traveler
			}
			random_list = {
				10 = {
					add_trait_xp = {
						trait = lifestyle_traveler
						track = travel
						value = {
							medium_lifestyle_random_xp_low
							medium_lifestyle_random_xp_high
						}
					}
				}
				10 = {
					add_trait_xp = {
						trait = lifestyle_traveler
						track = danger
						value = {
							medium_lifestyle_random_xp_low
							medium_lifestyle_random_xp_high
						}
					}
				}
			}
		}
		if = {
			limit = {
				has_trait = pilgrim
			}
			add_trait_xp = {
				trait = pilgrim
				value = {
					medium_lifestyle_random_xp_low
					medium_lifestyle_random_xp_high
				}
			}
		}
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_evangelizer_template = {
	age = { 32 70 }
	random_traits = yes
	culture = root.culture
	faith = root.faith
	trait = devoted
	random_traits_list = {
		count = 1
		education_learning_3 = {}
		education_learning_4 = {}
		education_learning_5 = {}
	}
	learning = {
		min_template_high_skill
		max_template_high_skill
	}
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_poet_template = {
	age = { 20 70 }
	gender_female_chance = 50
	random_traits = yes
	culture = root.culture
	faith = root.faith
	diplomacy = {
		min_template_medium_skill max_template_high_skill
	}
	learning = {
		min_template_medium_skill max_template_high_skill
	}
	random_traits_list = {
		education_diplomacy_1 = { weight = { base = 25 } }
		education_diplomacy_2 = { weight = { base = 30 } }
		education_diplomacy_3 = { weight = { base = 20 } }
		education_diplomacy_4 = { weight = { base = 20 } }
		education_diplomacy_5 = { weight = { base = 5 } }
	}
	random_traits_list = {
		count = { 0 1 }
		diplomat = {}
		family_first = {}
		generous = {}
		arrogant = {}
		honest = {}
		gregarious = {}
		trusting = {}
		compassionate = {}
		fickle = {}
		forgiving = {}
		poet = {}
		tourney_participant = {}
		lifestyle_traveler = {}
		scholar = {}
	}
	random_traits_list = {
		count = { 0 1 }
		beauty_good_1 = {}
		beauty_good_2 = {}
		beauty_good_3 = {}
	}
	random_traits_list = {
		count = { 0 1 }
		intellect_good_1 = {}
		intellect_good_2 = {}
		intellect_good_3 = {}
		shrewd = {}
	}
	dynasty = generate
	after_creation = {
		add_trait = poet
		set_interesting_traits_and_modifiers_effect = yes
		if = {
			limit = { has_trait = lifestyle_reveler }
			add_trait_xp = {
				trait = lifestyle_reveler
				value = {
					integer_range = {
						min = small_lifestyle_random_xp_low
						max = small_lifestyle_random_xp_high
					}
				}
			}
		}
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = tourney_participant
			TRACK = wit
			LEVEL_1 = yes
			LEVEL_3 = no
		}
		random_list = {
			5 = {
				give_nickname = nick_the_rhymer
			}
			5 = {
				give_nickname = nick_the_elegist
			}
			5 = {
				give_nickname = nick_the_poetaster
				add_diplomacy_skill = -10
			}
			1 = {
				give_nickname = nick_the_elysian_muse
				add_diplomacy_skill = 10
			}
			84 = {} #Left blank
		}
		random = {
			#Some would say I'm doing this to create more fitting shenanigans for the Violet Poet.
			#Actually no. I'm doing this because bisexuals make better poets.
			#It's scientifically proven.
			chance = 75
			set_sexuality = bisexual
		}
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_wallada_heir_template = {
	age = { 16 25 }
	gender_female_chance = 100
	random_traits = yes
	culture = root.culture
	faith = root.faith
	diplomacy = {
		min_template_medium_skill max_template_high_skill
	}
	learning = {
		min_template_medium_skill max_template_high_skill
	}
	random_traits_list = {
		education_diplomacy_1 = { weight = { base = 25 } }
		education_diplomacy_2 = { weight = { base = 25 } }
		education_diplomacy_3 = { weight = { base = 20 } }
		education_diplomacy_4 = { weight = { base = 20 } }
		education_diplomacy_5 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 1 2 }
		diplomat = {}
		family_first = {}
		generous = {}
		arrogant = {}
		honest = {}
		gregarious = {}
		trusting = {}
		compassionate = {}
		fickle = {}
		forgiving = {}
		poet = {}
		tourney_participant = {}
		lifestyle_traveler = {}
		scholar = {}
	}
	random_traits_list = {
		count = 1
		beauty_good_1 = {}
		beauty_good_2 = {}
		beauty_good_3 = {}
		intellect_good_1 = {}
		intellect_good_2 = {}
		intellect_good_3 = {}
	}
	dynasty = generate
	after_creation = {
		add_trait = poet
		set_interesting_traits_and_modifiers_effect = yes
		if = {
			limit = { has_trait = lifestyle_reveler }
			add_trait_xp = {
				trait = lifestyle_reveler
				value = {
					integer_range = {
						min = small_lifestyle_random_xp_low
						max = small_lifestyle_random_xp_high
					}
				}
			}
		}
		random = {
			#A chip off the ol' Wallada block
			chance = 100
			set_sexuality = bisexual
		}
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_poet_toned_down_template = {
	age = { 20 60 }
	gender_female_chance = 50
	random_traits = yes
	faith = root.faith
	diplomacy = {
		min_template_medium_skill max_template_high_skill
	}
	random_traits_list = {
		education_diplomacy_2 = { weight = { base = 25 } }
		education_diplomacy_3 = { weight = { base = 20 } }
		education_diplomacy_4 = { weight = { base = 20 } }
		education_diplomacy_5 = { weight = { base = 5 } }
	}
	random_traits_list = {
		count = { 0 1 }
		diplomat = {}
		generous = {}
		arrogant = {}
		honest = {}
		gregarious = {}
		fickle = {}
		forgiving = {}
		lifestyle_traveler = {}
		scholar = {}
		intellect_good_1 = {}
		intellect_good_2 = {}
		intellect_good_3 = {}
		shrewd = {}
	}
	dynasty = generate
	after_creation = {
		add_trait = poet
		set_interesting_traits_and_modifiers_effect = yes
		if = {
			limit = { has_trait = lifestyle_reveler }
			add_trait_xp = {
				trait = lifestyle_reveler
				value = {
					integer_range = {
						min = small_lifestyle_random_xp_low
						max = small_lifestyle_random_xp_high
					}
				}
			}
		}
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = tourney_participant
			TRACK = wit
			LEVEL_1 = yes
			LEVEL_3 = no
		}
		random_list = {
			5 = {
				give_nickname = nick_the_rhymer
			}
			5 = {
				give_nickname = nick_the_elegist
			}
			5 = {
				give_nickname = nick_the_poet
			}
			5 = {
				give_nickname = nick_the_eloquent
			}
			1 = {
				give_nickname = nick_the_elysian_muse
				add_diplomacy_skill = 10
			}
			84 = {} #Left blank
		}
		shogunate_set_fictional_nickname_effect = yes
	}
}


ep3_murderer_template = {
	age = { 25 45 }
	random_traits = yes
	culture = root.culture
	faith = root.faith
	trait = gallowsbait
	gender_female_chance = root_soldier_female_chance
	random_traits_list = {
		count = 1
		education_martial_2 = {}
		education_martial_3 = {}
		education_martial_4 = {}
	}
	prowess = {
		min_template_high_skill
		max_template_high_skill
	}
	intrigue = {
		min_template_high_skill
		max_template_high_skill
	}
	after_creation = {
		add_trait = gallowsbait
		add_trait_xp = {
			trait = gallowsbait
			track = marauder
			value = { 50 90 }
		}
		set_interesting_traits_and_modifiers_effect = yes
		shogunate_set_fictional_nickname_effect = yes
	}
}

ep3_sea_raider_template = {
	#General
	age = { 20 50 }
	faith = scope:raider_faith
	culture = scope:raider_culture
	dynasty = generate
	#Education
	random_traits_list = {
		count = 1
		education_martial_1 = {
			weight = { base = 20 }
		}
		education_martial_2 = {
			weight = { base = 30 }
		}
		education_martial_3 = {
			weight = { base = 30 }
		}
		education_martial_4 = {
			weight = { base = 20 }
		}
	}
	#Personality
	trait = ambitious
	random_traits_list = {
		count = 2
		gluttonous = {}
		greedy = {}
		diligent = {}
		wrathful = {}
		impatient = {}
		arrogant = {}
		honest = {}
		brave = {}
		gregarious = {}
		zealous = {}
		trusting = {}
		callous = {}
		fickle = {}
		vengeful = {}
	}
	#Misc
	random_traits = no
	gender_female_chance = {
		if = {
			limit = {
				scope:raider_faith = { has_doctrine = doctrine_gender_male_dominated }
			}
			add = 0
		}
		else_if = {
			limit = {
				scope:raider_faith = { has_doctrine = doctrine_gender_female_dominated }
			}
			add = 100
		}
		else = {
			add = 50
		}
	}
	trait = viking
	#Skills
	diplomacy = { min_template_low_skill max_template_average_skill }
	martial = { min_template_low_skill min_template_average_skill }
	stewardship = { min_template_low_skill min_template_average_skill }
	intrigue = { min_template_low_skill min_template_average_skill }
	learning = { min_template_low_skill max_template_average_skill }
	prowess = { min_template_decent_skill max_template_high_skill }
	after_creation = {
		shogunate_set_fictional_nickname_effect = yes
	}
}
